package cn.edu.ujn.boot.service.impl;

import java.util.List;

import javax.websocket.server.ServerEndpoint;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.edu.ujn.boot.dao.CustomerMapper;
import cn.edu.ujn.boot.po.Customer;
import cn.edu.ujn.boot.service.ICustomerService;

@Service("customerService")
public class CustomerServiceImpl implements ICustomerService {
	@Autowired
	private CustomerMapper customerMapper;

	@Override
	public long countByExample(Customer customer) {
		// TODO Auto-generated method stub
		long count = customerMapper.countByExample(customer);
		return count;
	}

	@Override
	public int deleteByPrimaryKey(Integer custId) {
		// TODO Auto-generated method stub
		int key = customerMapper.deleteByPrimaryKey(custId);
		return key;
	}

	@Override
	public int insert(Customer customer) {
		// TODO Auto-generated method stub
		int insert = customerMapper.insert(customer);
		return insert;
	}

	@Override
	public int updateByPrimaryKeySelective(Customer customer) {
		// TODO Auto-generated method stub
		int select = customerMapper.updateByPrimaryKeySelective(customer);
		return select;
	}

	@Override
	public List<Customer> selectByExample() {
		// TODO Auto-generated method stub
		List<Customer> list = customerMapper.selectByExample();
		return list;
	}

	@Override
	public List<Customer> selectSelective(Customer customer) {
		// TODO Auto-generated method stub
		
		return customerMapper.selectSelective(customer);
	}




	
}
